Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Add a validate_cmd to config file resource #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

timbirk
Copy link

@timbirk timbirk commented Jul 18, 2017

Hi Tron,

Awesome module! I ran into a problem lately where deploying a config change caused services to fail at restart but Puppet to carry on happily and Jenkins to deploy these changes throughout the (non-production) environments with no problem.

We could be a bit more defensive and validate the file before it gets copied in place using the Dropwizard check command. I've added the ability to enable / disable this by setting $config_test on the dropwizard::instance you want to check.

On reflection I think that Restart=on-failure in the systemd unit might be a part of the problem too. Maybe Restart=on-abnormal would be a better option so that if the Dropwizard server command fails to start and exits != 0 Puppet should (might) pick up this failure?

Any feedback would be greatly appreciated.

Thanks,

Tim.

@timbirk
Copy link
Author

timbirk commented Jul 18, 2017

On further reflection I've also made the addition of a config_change_restart parameter to allow the disablement of notifying the service on file change. In automated environments where people commit straight to master this could cause an unexpected / unauthorised restart of instances.

It also allows for reloading of configs to be handled in application to pick up changes automatically and not require a JVM / service restart.

@timbirk
Copy link
Author

timbirk commented Jul 18, 2017

It looks like the latest 2.1.0 vesion of puppetlabs-java is being pulled in for tests and is only valid for Puppet 4.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant